Properties of an HTML Element
In HTML, every element is represented as an object in the Document Object Model (DOM). These objects have properties, which are values that define the state and behavior of the element. Properties are different from attributes: attributes are defined in the HTML markup, while properties are the current values that JavaScript sees when working with the DOM.
id – reflects the element's id attribute
className – reflects the element's class attribute
innerHTML – represents the HTML content inside the element
textContent – represents only the text content
value – for form elements (input, textarea, select)
checked – for checkboxes and radio buttons
disabled – indicates if the element is disabled
style – allows access to inline styles via JavaScript